Upgrade ApplicationModules database
PME Segment Edition Note: The default path for any of the PME Segment Editions is different and needs to be changed to reflect this.
- Navigate to the
...\SBS Upgrade Package\SQL_Script_Files folder and use a text editor to open SSDT_cmd_Line.bat.
- Before running the script, make the following changes to the file in this order:
- In a text editor open
SSDT_cmd_Line.bat, right-click and select Edit.
- Verify the Microsoft SQL Server path is correct. Edit the path if it is not the following:
SET "PathToSqlPackage=Microsoft SQL Server\120\DAC\bin\sqlpackage.exe"
- Verify that the SQL path and the SQL Instance are correct. Change if different from the following:
- The MDFPath and the LDFPath need to reflect the SQL Version being used and the SQL Instance respectively, NOT the database path.
- SQL 2008R2 will be
MSSQL10_50.<SQL Instance>\MSSQL\DATA - SQL 2012 will be
MSSQL11.<SQL Instance>\MSSQL\DATA - SQL 2014 will be
MSSQL12.<SQL Instance>\MSSQL\DATA
- (Optional) If the PME system is not installed at the default file location, edit the following parameter to match to the system’s exact file path:
SET PMEPath=C:\Program Files (x86)\Schneider Electric\Power Monitoring Expert
- After saving the file, execute it by double-clicking on the file name.
After the above batch file is executed, close the prompt window. An ApplicationModules.sql file is created in the ...\SBS Upgrade Package.
- Before running the
ApplicationModules.sql file, enable the SQLCMD mode:
- In SQL Server Management Studio click Tools > Options > Query Execution > SQL Server > General.
- Select By default, open new queries in SQLCMD mode, then click OK.
- In SQL Server Management Studio open the
ApplicationModules.sql file and then click Execute to run the script.
- After running the
ApplicationModules.sql file, disable the SQLCMD mode:
- In SQL Server Management Studio click Tools > Options > Query Execution > SQL Server > General.
- Uncheck By default, open new queries in SQLCMD mode, then click OK.
- Update the DataSourceSignature:
- In SQL Management Studio, go to the ApplicationModules.DataSourceBus.DataSource table.
- Right-click the table and select top 1000 rows.
- Copy the Signature by right-clicking and selecting Copy.
- In a text editor open
…\Schneider Electric\Power Monitoring Expert\Applications\bin\DataServicesHost.config and then update the DataSourceSignature value to match the one you copied in the image above.
Note: Once the upgrade is complete, it is recommended that you make a backup of the upgraded databases. Should your database become corrupted at a later time, this backup of the upgraded databases will help you to complete the upgrade successfully. A suggested location for these backups is …\Schneider Electric\Power Monitoring Expert\config\cfg\DBBackups.